-
-
Notifications
You must be signed in to change notification settings - Fork 339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][ADD] product_multi_barcode_constraint_per_company: add module #546
[14.0][ADD] product_multi_barcode_constraint_per_company: add module #546
Conversation
51df296
to
6cc4f18
Compare
Following this @legalsylvain 's comment. |
affa192
to
bda8432
Compare
3ef6439
to
11a15df
Compare
@api.constrains("name") | ||
def _check_duplicates(self): | ||
for record in self: | ||
barcodes = self.search( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a limit parameter?
barcodes = self.search([...], limit=1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll fix it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix comments
|
||
|
||
@tagged("post_install", "-at_install") | ||
class TestProductBarcodeConstraintInherit(TestModule): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For each tests need docstring and assertion message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll fix it now
2950ae7
to
e62aea3
Compare
@@ -0,0 +1 @@ | |||
This is a bridge module between "product_barcode_constraint_per_company" and "product_multi_barcode" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be remove this file. News fragments using for updating module not for creating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
fffbd4d
to
557d86d
Compare
This is a bridge module between "product_multi_barcode" and "product_barcode_constraint_per_company"